<?php
namespace app\common\model;
use think\Model;
use app\common\model\Purchase;

class OrdersItemReject extends Model
{

	protected $append = [
		'pur_price'
	];
	// 设置工厂价
	public function getPurPriceAttr($value,$data)
    {
		$res = Purchase::where(['order_item_id'=>$data['order_item_id'],'status'=>['neq',2]])->value('price');
        return $res;
    }
}